<?php
	/**
	 * ThinkSAAS全局项加载
	 * @copyright (c) ThinkSAAS All Rights Reserved
	 * @code by QINIAO
	 * @Email:qiniao@vip.qq.com
	 */

	error_reporting(7);
	ob_start();
	session_start();

	#APP专用
	$app	= isset($_GET['app']) ? $_GET['app'] : 'index';
	#Action专用
	$ac	= isset($_GET['ac']) ? $_GET['ac'] : 'index';
	#纪念ThinkSNS
	$ts	= isset($_GET['ts']) ? $_GET['ts'] : '';
	#Admin管理专用
	$mg	= isset($_GET['mg']) ? $_GET['mg'] : 'index';
	#Api专用
	$api	= isset($_GET['api']) ? $_GET['api'] : 'index';

	/*
	 *加载基础函数
	 */

	require_once THINKSAAS.'/public/fun/function.base.php';


	/*
	 *加载扩展类并且NEW类
	 */

	require_once THINKSAAS.'/public/class/class.tsApi.php';
	$tsApi = new tsApi();


	header('Content-Type: text/html; charset=UTF-8');

	/*
	 *加载软件信息
	 */

	$_SOFT['info'] = array(
		'name'		=>	'ThinkSAAS',
		'version'	=>	'V.0.6',
		'url'			=>	'http://www.thinksaas.cn',
		'email'		=>	'qiniao@vip.qq.com',
		'copyright' =>	'ThinkSAAS',
		'year'		=>	'2009 - 2011',
		'author'		=>	'奇鸟',
		'count'		=>	'',
	);

	date_default_timezone_set('Etc/GMT-8');

